package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.MallUserActivityRankingDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface MallUserActivityRankingDetailMapper extends BaseMapper<MallUserActivityRankingDetail> {

    List<MallUserActivityRankingDetail> getUserRanking(@Param("rankingCycleId") Long rankingCycleId, @Param("limit") Integer limit, @Param("thresholdAmount") BigDecimal thresholdAmount);

    Page<MallUserActivityRankingDetail> queryUserRankingPage(IPage page, @Param("rankingCycleId") Long rankingCycleId, @Param("limit") Integer limit, @Param("phoneNumber") String phoneNumber,@Param("thresholdAmount") BigDecimal thresholdAmount);

    int updateConfirmedTotalAmount(@Param("userId") Long userId, @Param("rankingCycleId") Long rankingCycleId, @Param("amount") BigDecimal amount);

    int updateTotalAmount(@Param("userId") Long userId, @Param("rankingCycleId") Long rankingCycleId, @Param("amount") BigDecimal amount);
}